<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const arr = []
        arr[0]= 100
        arr[3] =300
        console.log(arr)
        console.log(arr.length)//这里长度有4 因为直接定义数组下标为3 也就是数组有4个
        //中间的下标也是数组的一分子 只不过是empty空的而已
    </script>
</body>
</html>